{% extends "book/template.html" %}
{% block publish %}
<ul class="nav nav-pills nav-stacked sub-left-list nav-active">
    <li class="active"><a href="/view_publish/"> <span>查看出版社</span></a></li>
    <li><a href="/add_publish/"> <span>添加出版社</span></a></li>
</ul>
{% endblock publish %}
{% block container %}
    <div class="row">
        <div class="page-header ">
            <div class="col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2 main">
                <!-- 面板开始 -->
                <div class="panel panel-primary">
                    <div class="panel-heading"><h3 class="panel-title">查看出版社</h3></div>
                    <div class="panel-body">
                        <table class="table table-striped table-bordered">
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>出版社</th>
                                    <th>地址</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            {% for publish in publish_list %}
                                <tr>
                                    <td>{{ forloop.counter }}</td>
                                    <td>{{ publish.name }}</td>
                                    <td>{{ publish.city}}</td>
                                    <td class="text-center">
                                        <a class="btn btn-info btn-sm" href="/edit_publish/{{ publish.id }}"><i
                                            class="fa fa-pencil fa-fw" aria-hidden="true"></i>编辑
                                        </a>
                                        <a class="btn btn-danger btn-sm" href="/del_publish/?id={{ publish.id }}"><i
                                            class="fa fa-trash-o fa-fw"
                                            aria-hidden="true"></i>删除
                                        </a>
                                    </td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                            <!--分页 开始-->
                            <div>
                                <nav aria-label="Page navigation" class="pull-right">
                                    <ul class="pagination">
                                        {{ pagination.page_html|safe }}
                                    </ul>
                                </nav>
                            </div>
                            <!--分页 结束-->
                        </div>
                    </div>
                    <!-- 面板 结束-->
                </div>
        </div>
    </div>
{% endblock container %}